package com.moonstar.service.impl;

import com.moonstar.mapper.MessageMapper;
import com.moonstar.pojo.MessageDO;
import com.moonstar.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessageMapper messageMapper;

    @Override
    public List<MessageDO> list(Map<String, Object> map) {
        return messageMapper.list(map);
    }

    @Override
    public int count(Map<String, Object> map) {
        return messageMapper.count(map);
    }

    @Override
    public int save(MessageDO messageDO) {
        return messageMapper.save(messageDO);
    }

    @Override
    public List<MessageDO> query(Long meId, Long toId) {
        return messageMapper.query(meId, toId);
    }
}
